package com.lovo.bean;

import java.util.ArrayList;
import java.util.List;

public class CutPageBean<T> {
    private List<T> list = new ArrayList<>();
    private int count;
    private int totalPage;
    public static final int PAGESIZE = 4;

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
        this.totalPage = count % PAGESIZE ==0 ?count/PAGESIZE:count/PAGESIZE+1;
    }

    public int getTotalPage() {
        return totalPage;
    }


    @Override
    public String toString() {
        return "CutPageBean{" +
                "list=" + list +
                ", count=" + count +
                ", totalPage=" + totalPage +
                '}';
    }
}
